home *** CD-ROM | disk | FTP | other *** search
- Path: news.bellglobal.com!news
- From: rchartra@feldspar.com (Ron Chartrand)
- Newsgroups: comp.lang.c++
- Subject: Random dice program problem need help!!!!!
- Date: Wed, 14 Feb 1996 00:08:51 GMT
- Organization: Bell Global Solutions
- Message-ID: <4fqum6$pbj@news.bellglobal.com>
- NNTP-Posting-Host: p001.feldspar.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- I am using Borland C 4.52 i have been trying to make a callable
- routine to simulate rolling 3 six sided dice but it always comes out
- to be the same number?? need help!!!!!
-
- //3d6 dice roll
- void Threed6()
- {
- randomize();
- dice1=0;
- dice2=0;
- dice3=0;
-
- dice1=rand()%6+1;
- dice2=rand()%6+1;
- dice3=rand()%6+1;
- Total=dice1+dice2+dice3;
- }
-
- just Email me at rchartra@feldspar.com
-
-
-
-